package com.tang.logger.pusher.databases;

import com.tang.logger.domain.LogMessage;
import com.tang.logger.pusher.AbstractLogPusher;

import javax.annotation.Resource;

/**
 * @author Tang
 * @classname DefaultDatabaseLogPusher
 * @description [  ]
 * @date 2021/7/25 11:19
 */
public class DefaultDatabaseLogPusher extends AbstractLogPusher implements DatabaseLogPusher{

    @Resource
    JdbcService jdbcService;

    public DefaultDatabaseLogPusher(String namePrefix) {
        super(namePrefix);
    }

    @Override
    protected void push0(LogMessage logMessage) {
        jdbcService.insert(logMessage);
    }
}